import requests
import time
from hashlib import md5

headers = {
    "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36"
}
cookies = {
    "sessionid": "4ibp2aug077l6m1ktmemngtwny07kpur",
}
url = "https://match.yuanrenxue.cn/api/match/20"

# 开始生成参数
#  getStringFromWasm0(1114192,31)
string = 'D#uqGdcw41pWeNXm'
result_list = []
for i in range(1, 6):
    t = int(time.time()) * 1000 
    decode_string = str(i) + '|' + str(t) + string
    md5_obj = md5()
    md5_obj.update(decode_string.encode(encoding='utf-8'))  
    params = {
        "page": i,
        "sign": md5_obj.hexdigest(),
        "t": str(t)
    }
    response = requests.get(url, headers=headers, cookies=cookies, params=params)
    datas = response.json()['data']
    for i in datas:
        result_list.append(i['value'])
print(sum(result_list))